Calculate subnet masks, network addresses, broadcast addresses, usable host ranges, and more for both IPv4 and IPv6. Supports CIDR notation, wildcard masks, and binary conversion.
Select between IPv4 Subnet, IPv6 Subnet, or CIDR Lookup using the tabs above. Each mode provides tailored subnet calculations for your networking needs.
Type an IP address with or without CIDR notation (e.g., 192.168.1.0/24) or enter IP and prefix separately. For quick testing, click any preset button above the input field.
Instantly see the network address, broadcast address, usable host range, subnet mask, wildcard mask, total hosts, binary representation, and more. Results are calculated entirely in your browser.
The FreeNestTools Subnet, CIDR & IPv6 Calculator is a free, privacy-first online tool that performs comprehensive subnet calculations for both IPv4 and IPv6 networks. Whether you are a network administrator planning IP allocations, a student learning subnetting, a DevOps engineer configuring cloud VPCs, or an IT professional troubleshooting connectivity, this tool provides accurate and instant subnet information.
IPv4 Subnetting — Enter any IPv4 address with a CIDR prefix (e.g., 192.168.1.0/24) to calculate the network address, broadcast address, first and last usable host IPs, subnet mask, wildcard mask, total number of hosts, usable hosts, and the binary representation showing network and host bits. The tool performs calculations using native JavaScript with no external API calls, ensuring 100% privacy.
IPv6 Subnetting — IPv6 uses 128-bit addresses with a typical /64 prefix for local networks. The tool expands compressed IPv6 addresses (e.g., 2001:db8::/32) to their full notation, calculates the network prefix, and shows both the expanded and compressed formats. Understanding IPv6 subnetting is increasingly important as IPv4 addresses become scarce and more networks transition to IPv6.
CIDR (Classless Inter-Domain Routing) replaced the traditional class-based IP addressing system (Class A, B, C) in the 1990s. CIDR allows for flexible prefix lengths (/0 through /32 for IPv4, /0 through /128 for IPv6), enabling efficient allocation of IP address space. This tool helps you understand any CIDR notation by computing all relevant subnet parameters.
Key calculations provided:
255.255.255.0 for /24)Common CIDR prefixes: /8 (255.0.0.0) — 16.7M hosts, /16 (255.255.0.0) — 65,534 hosts, /24 (255.255.255.0) — 254 hosts, /25 — 126 hosts, /26 — 62 hosts, /27 — 30 hosts, /28 — 14 hosts, /29 — 6 hosts, /30 — 2 hosts (point-to-point links). For IPv6, /64 is the standard subnet size providing 264 addresses.
To determine required bandwidth for your network, check the Bandwidth Calculator.
Privacy guarantee: All subnet calculations are performed entirely in your browser using client-side JavaScript. No IP addresses, subnet data, or any other information is transmitted to our servers or any third-party service. Your network designs remain completely private. No registration, account creation, or personal information is required.
Use cases: Network infrastructure planning, firewall rule configuration, VPC subnet design for AWS/Azure/GCP, DHCP scope planning, network documentation, CCNA/Network+ exam preparation, IP address management (IPAM), and general network education.
IP/prefix, where the prefix is the number of consecutive 1-bits in the subnet mask. For example, 192.168.1.0/24 means the IP address is 192.168.1.0 with a subnet mask of 255.255.255.0 (24 network bits and 8 host bits). CIDR was introduced in 1993 to replace the rigid class-based addressing system (Class A, B, C) and to slow the growth of routing tables. It allows network administrators to create subnets of any size, making IP address allocation much more efficient. CIDR is now the standard method for IP address assignment and routing on the internet./24 subnet has 28 - 2 = 254 usable hosts. A /26 subnet has 26 - 2 = 62 usable hosts. A /30 subnet has 22 - 2 = 2 usable hosts (ideal for point-to-point links between routers). For /31 subnets, RFC 3021 allows using both addresses (no network/broadcast), giving 2 usable hosts for point-to-point links. For /32, only one host is available.255.255.255.0 = 24 ones + 8 zeros). A wildcard mask is the bitwise inverse of the subnet mask: 0-bits for network and 1-bits for host (e.g., 0.0.0.255). Wildcard masks are used in Cisco ACLs (Access Control Lists), OSPF routing protocol configurations, and certain network filtering scenarios. To calculate a wildcard mask, simply subtract each octet of the subnet mask from 255: 255.255.255.0 becomes 0.0.0.255.192.168.1.42/26: the mask is 255.255.255.192, the network address is 192.168.1.0, and the broadcast address is 192.168.1.63. Usable hosts are 192.168.1.1 through 192.168.1.62.2001:0db8:0000:0000:0000:8a2e:0370:7334 can be shortened in two ways: 1) Leading zero suppression — remove all leading zeros in each block (e.g., 0db8 → db8, 0370 → 370). 2) Zero compression — replace the longest consecutive run of all-zero blocks with :: (only once). So 2001:0db8:0000:0000:0000:8a2e:0370:7334 becomes 2001:db8::8a2e:370:7334. Our tool automatically performs both expansion (converting compressed addresses to full notation) and compression for you.192.168.1.0/24, the first 24 bits (192.168.1) are the network portion and the last 8 bits (.0) are the host portion. This binary view is invaluable for learning subnetting and understanding how routers determine whether an address belongs to the local network or a remote network.2001:db8::/32 or 2001:0db8:85a3:0000:0000:8a2e:0370:7334/64). The tool will calculate the network prefix, show both the expanded (full 32-hex-digit) and compressed (shortened) forms of the address, and display the binary pattern. IPv6 subnetting is essential for modern network design as the world transitions from IPv4. Key differences from IPv4: IPv6 does not have broadcast addresses, the standard subnet size is /64, and addresses are written in hexadecimal colon notation. This tool helps you understand these differences and plan your IPv6 addressing scheme./24 subnet has 256 total addresses but only 254 usable addresses. The network address (.0) is reserved to identify the subnet itself, and the broadcast address (.255) is reserved for sending packets to all devices on the subnet. For /31 subnets, RFC 3021 eliminates the concept of network and broadcast addresses for point-to-point links, making both addresses usable, which gives 2 usable hosts despite the formula giving 0. For /32, only one host is available.192.168.1.0/24, the binary shows: 11000000 10101000 00000001 00000000. The first 24 bits (purple) are the network prefix, and the last 8 bits (teal) are available for host addressing. To find the network address, look at the bits where the mask is 1. To find the broadcast address, set all teal bits to 1.255.255.255.254 with exactly 2 IP addresses (0 usable by the traditional formula, but both are usable per RFC 3021). /31 subnets are specifically designed for point-to-point links between routers. Normally, a point-to-point link using /30 wastes 2 of the 4 addresses (network, broadcast, and only 2 usable). With /31, both addresses are used for the two router interfaces, eliminating waste. RFC 3021 allows the use of /31 subnets on point-to-point links. When you configure a /31 on a Cisco interface, there is no network or broadcast address — both addresses are valid host addresses. Many ISPs use /31 subnets for their router-to-router connections. Our calculator handles /31 subnets correctly, showing both addresses as usable.